import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';
import {
  SettingBanner,
  SettingQuick,
  SettingWechat,
  SettingWepay,
} from '../dtos/setting.dot';

@Entity('tb_setting', {
  comment: '设置表',
})
export class Setting {
  @PrimaryGeneratedColumn('increment', { comment: '自增主键', unsigned: true })
  id: number;

  @Column({ comment: '轮播', type: 'text' })
  banner: SettingBanner[];

  @Column({ comment: '链接', type: 'text' })
  quicks: SettingQuick[];

  @Column({ comment: '微信', type: 'text' })
  wechat: SettingWechat;

  @Column({ comment: '支付宝', type: 'text' })
  alipay: JSON;

  @Column({ comment: '微信支付', type: 'text' })
  wepay: SettingWepay;

  @Column({ comment: '抖音', type: 'text' })
  douyin: JSON;

  @Column({ comment: '快手', type: 'text' })
  kuaishou: JSON;

  @Column({ comment: '高德', type: 'text' })
  amap: JSON;

  @Column({ comment: '邮件', type: 'text' })
  email: JSON;
}
